/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package serialization_server;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.io.Serializable;

/**
 *
 * @author alexey
 */
public class Serialization_server{

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws FileNotFoundException, IOException {
        // TODO code application logic here
        Aliev obj = new Aliev((short)-20, "Ramizal",(short)3,(short)4);
        FileOutputStream fos = new FileOutputStream("jack");
        ObjectOutputStream oos = new ObjectOutputStream(fos);
        oos.writeObject(obj);
        oos.close();
    }
    
}

class Aliev implements Serializable{
    int zp;
    String name;
    short height;
    short width;
    
    Aliev(int z, String n, short h, short w){
        zp = z;
        name = n;
        height = h;
        width = w;
    }
}